local weimu = fk.CreateSkill({
    name = "sj3__weimu",
  })
  
  Fk:loadTranslationTable{
    ["sj3__weimu"] = "帷幕",
    [":sj3__weimu"] = "其他角色对你或于你回合内使用<a href='jishipai_js'>即时牌</a>时，你可以将一个空的“<b>鬼谋</b>”添加描述：<br><i><b>限定技</b>，你可以视为使用或打出一张【】。<br></i>然后令此牌无效并将之牌名加入上述括号。",
    
    ["#sj3__weimu"] = "帷幕：你可以令%arg无效并将一个“<b>鬼谋</b>”改为：<b>限定技</b>，你可以视为使用或打出一张【%arg】。",  
    ["#sj3__weimu-ask"] = "帷幕：选择一个“<b>鬼谋</b>”改为：<b>限定技</b>，你可以视为使用或打出一张【%arg】。",

    ["$sj3__weimu1"] = "此计伤不到我。",
    ["$sj3__weimu2"] = "你奈我何？",
    ["$sj3__weimu3"] = "神仙难救，神仙难救啊。",
    ["$sj3__weimu4"] = "我要你三更死，谁敢留你到五更！",  
  }

  weimu:addEffect(fk.CardUsing, {
    mute = true,
    can_trigger = function(self, event, target, player, data)
      return player:hasSkill(weimu.name) and data.from ~= player and --自己不是使用者
      (table.contains(data.tos,player) or--成为目标
      player.phase ~= Player.NotActive) and --回合内
      (data.card.type == Card.TypeBasic or (data.card.type == Card.TypeTrick and data.card.sub_type ~= Card.SubtypeDelayedTrick))--即时牌
    end,
    on_cost = function(self, event, target, player, data)
      local g = table.filter(player:getAllSkills(),function (s)
        return string.find(s.name,"sj3__guimou__") ~= nil --拥有的鬼谋技能
      end)
      local nokong = table.filter(g,function (m)--不空的
        return table.contains(player:getMarkNames(), m.name)
      end)
      event:setCostData(self,{skills = g,mark = nokong})
      return #nokong < #g and--不为空的鬼谋数量小于总鬼谋数量就代表有空的鬼谋
        player.room:askToSkillInvoke(player,{
          skill_name = weimu.name,
          prompt = "#sj3__weimu:::"..Fk:translate(data.card.name),
        })
    end,
    on_use = function(self, event, target, player, data)
      player.room:doIndicate(player,{data.from})
      player:broadcastSkillInvoke(weimu.name,math.random(1,2) + (player.phase ~= Player.NotActive and 2 or 0))
      local all,kong = {},{}
      local skills = event:getCostData(self).skills
      local mark = event:getCostData(self).mark
      for _, v in ipairs(skills) do
        table.insert(all,v.name)
        if not table.contains(mark, v) then--排除不为空的鬼谋
          table.insert(kong,v.name)
        end
      end
      local ask = player.room:askToChoice(player,{
        choices = kong,
        skill_name = weimu.name,
        all_choices = all,
        prompt = "#sj3__weimu-ask:::"..Fk:translate(data.card.name),
      })
      player.room:setPlayerMark(player,ask,data.card.name)
      data.toCard = nil--令牌失效
      data.tos = {}
    end,
  })

  return weimu